/**
 * Created by dale on 2017/7/25.
 */
$(document).ready(function () {
    var form=$('#form');

    $('#bt_modal_confirm',parent.document).click(function () {
        $('#bt_modal_confirm',parent.document).addClass('disabled');
        xhExtra.setBtnLoading($('#bt_modal_confirm',parent.document));
        $('#form').ajaxSubmit({
            type: 'POST',
            url: moduleUrl+'staff/importAttendData',
            success:function (responseText, statusText, xhr, $form) {
                window.top.swal('插入成功','','success')
                window.top.xhTop.getActiveFrame().attendList.dataGridReload();
                window.top.xhTop.closeModal();
            },
            error : function(xhr, status, err) {
                alert("操作失败");
            }
        });


        //form.submit();
        // window.top.xhTop.getActiveFrame().staffList.dataGridReload();
        // window.top.xhTop.closeModal();
    });
    modalBind.bindClick();
});